package com.bsoft.wx.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bsoft.wx.pojo.TbCheckin;
import org.apache.ibatis.annotations.Select;

import java.util.HashMap;

/**
 * <p>
 * 签到表 Mapper 接口
 * </p>
 *
 * @author hdh
 * @since 2023-01-11
 */
public interface TbCheckinMapper extends BaseMapper<TbCheckin> {
    @Select("SELECT id from tb_checkin where user_id=#{userId} and date=CURRENT_DATE and create_time BETWEEN #{start } and #{end} LIMIT 1")
    public Integer haveCheckin(HashMap param);

}
